﻿import Vue from 'vue'
import Router from 'vue-router'
//总组件
import Index from "../components/Index/Index";
// //首页组件
// // import Home from "../components/home/Home";
// //首页详情页
// import Xiang from "@/components/home/Xiang"
// //引入立即报名的页面
// import Bao from "@/components/home/Bao"
// //--->首页学习日历
// import Ri from "@/components/home/Ri"
// //课程组件
// // import Course from "../components/Course/Course";
// import Apply from "../components/Course/apply"
// //练习组件
// import Edit from "../components/Edit/Edit";
// import EditKdzl from "../components/Edit/Edit-kdzl/Edit-kdzl"
// import TextGit from "../components/Edit/Edit-kdzl/TextGit"
// import Edittjlx from "../components/Edit/Edit-tjlx/Edit-tjlx"
// import Editfzmk from "../components/Edit/Edit-fzmk/Edit-fzmk"
// import Editctjl from "../components/Edit/Edit-ctjl/Edit-ctjl"
// import Editcpjl from "../components/Edit/Edit-cpjl/Edit-cpjl"
// import Editxtsc from "../components/Edit/Edit-xtsc/Edit-xtsc"

// //题库组件
// import Ples from "../components/Edit/Edit-kdzl/Ples"
// import Limit from "../components/Edit/Edit-kdzl/Limit"
// import Biology from "../components/Edit/Edit-kdzl/Biology"
// import Chemistry from "../components/Edit/Edit-kdzl/Chemistry"
// import Mathematics from "../components/Edit/Edit-kdzl/Mathematics"
// import Physics from "../components/Edit/Edit-kdzl/Physics"
// import English from "../components/Edit/Edit-kdzl/English"
// //约课组件
// // import Study from "../components/Study/Study";
// // 2019/12/20---付东飞约课上传资料组件
// import Upload from "../components/Study/Upload.vue";
// // 2019/12/20---付东飞约课课后作业组件
// import Tack from "../components/Study/Tack.vue"
// // 2019/12/20---付东飞约课视频回放组件
// import Playblack from "../components/Study/Playblack.vue"
// //我的组件
// // import My from "../components/My/My";
// // 一对一路由文件
// import Oto from "../components/home/oto/onetoone.vue"
// // 一对一里面搜索文件
// import Serch from "../components/home/oto/serch.vue"
// // 登录组件
// import Login from "../components/My/Login/Login";
// // 找回密码组件
// import Forget from "../components/My/Login/forget-pass";
// // 验证登录组件
// import Sms from "../components/My/Login/sms-login";
// // 设置密码组件
// import Setpass from "../components/My/Login/set-pass";
// // 设置信息组件
// import Setmessage from "../components/My/Login/set-message";

// // 登录详情页
// // 提交信息
// import Information from "../components/My/Information";
// import Attention from "../components/My/Attention";
// import Collection from "../components/My/Collection";
// //设置退出
// import Setup from "../components/My/Setup";

// // 我是课程组件的详情页
// import Details from "../components/Course/Details"

// //===================================================================================================
// //选择学科路由
// import Attr fro

// m "../components/My/Attr";
// //设置姓名
// import Setname from "../components/My/set-name"
// import Setsex from "../components/My/set-sex"
Vue.use(Router);
export default new Router({
  routes: [{
      path: '/',
      name: 'Index',
      component: Index,
      children: [{
          path: "/home",
          name: "Home",
          component: ()=>import("../components/home/Home"),
          meta:{
              title:"每日每课",
              keepAlive:false
          }
        },
        {
          path: "/course",
          name: "Course",
          component: ()=>import("../components/Course/Course"),
          meta:{
            title:"特色课",
            keepAlive:false
          }
        },
        // 约课路由
        {
          path: "/study",
          name: "Study",
          component: ()=>import("../components/Study/Study"),
          meta:{
            title:"约课记录",
              keepAlive:false
          }
        },
        //练习下的路由
        {
          path: "/edit",
          name: "Edit",
          component: ()=>import("../components/Edit/Edit"),
          meta:{
            title:"练习",
              keepAlive:false
          }
        },
        //考点专练路由
        {
          path: "/kdzl",
          name: "EditKdzl",
          component: ()=>import("../components/Edit/Edit-kdzl/Edit-kdzl"),
        },
        //题库选择路由
        {
          path: "/textgit",
          name: "TextGit",
          component: ()=>import("../components/Edit/Edit-kdzl/TextGit"),
          children: [{
              path: "/textgit/ples",
              name: "Ples",
              component: ()=>import("../components/Edit/Edit-kdzl/Ples"),
            },
            {
              path: "/textgit/limit",
              name: "Limit",
              component: ()=>import("../components/Edit/Edit-kdzl/Limit"),
            },
            {
              path: "/textgit/biology",
              name: "Biology",
              component: ()=>import("../components/Edit/Edit-kdzl/Biology"),
            },
            {
              path: "/textgit/chemistry",
              name: "Chemistry",
              component: ()=>import("../components/Edit/Edit-kdzl/Chemistry"),
            },
            {
              path: "/textgit/mathematics",
              name: "Mathematics",
              component: ()=>import("../components/Edit/Edit-kdzl/Mathematics"),
            },
            {
              path: "/textgit/physics",
              name: "Physics",
              component: ()=>import("../components/Edit/Edit-kdzl/Physics"),
            },
            {
              path: "/textgit/english",
              name: "English",
              component: ()=>import("../components/Edit/Edit-kdzl/English"),
            }
          ]
        },

        {
          path: "/my",
          name: "My",
          component: ()=>import("../components/My/My"),
          meta: {
            type: 'token', //是否需要判断登录
            title:"个人中心"
          }
        },
        //==================================================================
        {
          path: "/xtsc",
          name: "Editxtsc",
          component: ()=>import("../components/Edit/Edit-xtsc/Edit-xtsc"),
        },
        {
          path: "/tjlx",
          name: "Edittjlx",
          component: ()=>import("../components/Edit/Edit-tjlx/Edit-tjlx"),
        },
        {
          path: "/ctjl",
          name: "Editctjl",
          component: ()=>import("../components/Edit/Edit-ctjl/Edit-ctjl"),
        },
        {
          path: "/cpjl",
          name: "Editcpjl",
          component: ()=>import("../components/Edit/Edit-cpjl/Edit-cpjl"),
        },
        {
          path: "/fzmk",
          name: "Editfzmk",
          component: ()=>import("../components/Edit/Edit-fzmk/Edit-fzmk"),
        },
        // 约课上传资料路由
        {
          path: "/upload",
          name: "Upload",
          component: ()=>import("../components/Study/Upload.vue")
        },
        // 课后作业
        {
          path: "/tack",
          name: "Tack",
          component: ()=>import("../components/Study/Tack.vue")
        },
        // 课后作业
        {
          path: "/playblack",
          name: "Playblack",
          component: ()=>import("../components/Study/Playblack.vue")
        },
        {
            path: "/",
            redirect: "/home",
        }
      ]
    },
    // {
    //   path:'/apply',
    //   name:"apply",
    //   component:()=>import("../components/Course/apply")
    // },
    {
      path: "/oto",
      name: "oto",
      component: ()=>import("../components/home/oto/onetoone.vue"),
      meta:{
        title:"一对一辅导"
      }
    },
    {
      path: "/serch",
      name: "serch",
      component: ()=>import("../components/home/oto/serch.vue"),
      meta:{
        title:"搜索"
      }
    },
    // 提交信息
    {
      path: "/information",
      name:"Information",
      component: ()=>import("../components/My/Information"),
      meta: {
        type: 'token', //是否需要判断登录
        title:"个人信息"
      }
    },
    //学科路由
    {
      path:"/xue",
      name:"xue",
      component:()=>import("../components/My/Xue")
    },
    //修改姓名
    {
      path:"/name",
      name:"name",
      component:()=>import("../components/My/Name")
    },
    // 男女
    {
      path:"/sex",
      name:"sex",
      component:()=>import("../components/My/Sex")
    },
    {
      path: "/attention",
      component: ()=>import("../components/My/Attention")
    },
    {
      path: "/collection",
      component: ()=>import("../components/My/Collection"),
      meta:{
        title:"我的收藏"
      }
    },
    {
      path: "/login",
      name: 'Login',
      component: ()=>import("../components/My/Login/Login"),
      meta:{
        title:"登录"
      }
    },
    {
      path: "/forget",
      name: "forget",
      component: ()=>import("../components/My/Login/forget-pass")
    },
    {
      path: "/sms-login",
      name: "sms-login",
      component: ()=>import("../components/My/Login/sms-login")
    },
    {
      path: "/set-pass",
      name: "set-pass",
      component: ()=>import("../components/My/Login/set-pass")
    },
    {
      path: "/set-message",
      name: "set-message",
      component: ()=>import("../components/My/Login/set-message")
    },
    //-->首页学习日历跳转
    {
      path: "/ri",
      name: "ri",
      component: ()=>import("@/components/home/Ri"),
      meta:{
        title:"学习日历"
      }
    },
    {
      path:"/login",
      name:'Login',
      component:()=>import("../components/My/Login/Login")
    },{
      path:"/forget",
      name:"forget",
      component:()=>import("../components/My/Login/forget-pass")
    },{
      path:"/sms-login",
      name:"sms-login",
      component:()=>import("../components/My/Login/sms-login")
    },{
      path:"/set-pass",
      name:"set-pass",
      component:()=>import("../components/My/Login/set-pass")
    },{
      path:"/set-message",
      name:"set-message",
      component:()=>import("../components/My/Login/set-message")
    },
    {
      path:"/setup",
      component:()=>import("../components/My/Setup")
    },
    {
      path: "/details",
      name: "details",
      component: ()=>import("../components/Course/Details"),
      meta:{
        title:"课程详情"
      }
    },
    //-->首页详情页跳转
    {
      path: "/tearch",
      name: "tearch",
      component: ()=>import("@/components/home/Xiang"),
      meta:{
        title:"讲师详情",
        meta:{
          keepAlive:false
        }
      }
    },
    //--->首页详情页立即报名跳转
    {
      path: "/bao",
      name: "bao",
      component: ()=>import("@/components/home/Bao"),
      meta:{
        title:"预约课程"
      }
    },
    {
      path: "/ke",
      name: "ke",
      component: ()=>import("../components/Course/Ke.vue"),
      meta:{
        title:"课程订单"
      }
    },

  ]
})
